package com.liulei.controller;

import com.liulei.entities.WaterDetails;
import com.liulei.service.WaterDetailsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@RequestMapping("/stat")
@Controller
@Slf4j
public class WaterDetailsController {
    @Autowired
    private WaterDetailsService waterDetailsService;

    @RequestMapping("/statWaterDetails")
    public String statWaterDetails(Model model) {
        //送水详细信息列表
        List<WaterDetails> waterList = waterDetailsService.querySendWaterDetails();
        model.addAttribute("waterList",waterList);
        return "waterDetailsList";
    }
}
